class UserController < ApplicationController
   before_filter :login_required

   def index
      @users = []
   end
   
   def post
      User.update(params[:user].keys, params[:user].values)
      flash[:notice] = 'Saved'
      redirect_to(:action => "index")
   end
   
   def delete
      rv = User.destroy(params[:id])
      if rv == 0
         render_text "This user did not exist"
      else
         render_text "document.getElementById('notice').innerHTML= 'User has been deleted';var el=document.getElementById('tr#{params[:id]}');new Effect.Fade(el);"
      end
   end
  
end
